<!doctype html>
<html class="no-js">
    <head>
    <include file="common/head"/>
    <style>
        .am-dropdown-content{
            z-index: 1000;
        }
    </style>
</head>
<body>
<include file="common/header"/>
<div class="am-cf admin-main">
    <!-- sidebar start -->
    <include file="common/sidebar"/>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">表单</strong> / <small>form</small></div>
        </div>
        <form class="am-form" method="POST" action="{$THINK.LINK}/article/edit">
            <div class="am-tabs am-margin" data-am-tabs>
                <ul class="am-tabs-nav am-nav am-nav-tabs">
                    <li class="am-active"><a href="#tab1">基本信息</a></li>
                    <li><a href="#tab2">详细描述</a></li>
                    <li><a href="#tab3">SEO 选项</a></li>
                </ul>

                <div class="am-tabs-bd">

                    <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">所属类别</div>
                            <div class="am-u-sm-8 am-u-md-10">
                                <select data-am-selected="{btnSize: 'sm'}" name="categoryId">
                                    <foreach name="categories" item="c">
                                        <option value="{$c.id}" <eq name="c.id" value="$article.categoryId">selected</eq>>{$c.name}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">显示状态</div>
                            <div class="am-u-sm-8 am-u-md-10">
                                <div class="am-btn-group" data-am-button>
                                    <label class="am-btn am-btn-default am-btn-xs <neq name='article.status' value='disable'>am-active</neq>">
                                        <input type="radio" name="status" id="option1" value="enable" <neq name='article.status' value='disable'>checked="true"</neq>> 正常
                                    </label>
                                    <label class="am-btn am-btn-default am-btn-xs <eq name='article.status' value='disable'>am-active</eq>">
                                        <input type="radio" name="status" id="option3" value="disable" <eq name='article.status' value='disable'>checked="true"</eq>> 不显示
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">推荐类型</div>
                            <div class="am-u-sm-8 am-u-md-10">
                                <div class="am-btn-group" data-am-button>
                                    <label class="am-btn am-btn-default am-btn-xs">
                                        <input type="checkbox"> 允许评论
                                    </label>
                                    <label class="am-btn am-btn-default am-btn-xs">
                                        <input type="checkbox"> 置顶
                                    </label>
                                    <label class="am-btn am-btn-default am-btn-xs">
                                        <input type="checkbox"> 推荐
                                    </label>
                                    <label class="am-btn am-btn-default am-btn-xs">
                                        <input type="checkbox"> 热门
                                    </label>
                                    <label class="am-btn am-btn-default am-btn-xs">
                                        <input type="checkbox"> 轮播图
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                发布时间
                            </div>
                            <div class="am-u-sm-8 am-u-md-10">
                                <div class="am-form-group am-form-icon">
                                    <i class="am-icon-calendar"></i>
                                    <input type="text" class="am-form-field am-input-sm" placeholder="时间">
                                </div>
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                球星
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="ballStar" value="{$article.ballStar}">
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                        </div>
                        
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                封面地址
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="snapshot" value="{$article.snapshot}">
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                        </div>
                        
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                视频地址
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="videoUrl" value="{$article.videoUrl}">
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                        </div>
                        
                        
                    </div>
                    <div class="am-tab-panel am-fade am-form" id="tab2">

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                文章标题
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="title" value="{$article.title}">
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                文章作者
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                <input type="text" class="am-input-sm" name="author" value="{$article.author}">
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                信息来源
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="source" value="{$article.source}">
                            </div>
                            <div class="am-hide-sm-only am-u-md-6">选填</div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                文章标签
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="label" value="{$article.label}">
                            </div>
                            <div class="am-u-sm-12 am-u-md-6">选填，有助于根据标签检索</div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                内容摘要
                            </div>
                            <div class="am-u-sm-8 am-u-md-4">
                                <input type="text" class="am-input-sm" name="abstract" value="{$article.abstract}">
                            </div>
                            <div class="am-u-sm-12 am-u-md-6">不填写则自动截取内容前255字符</div>
                        </div>

                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-12 am-u-md-2 am-text-right admin-form-text">
                                内容描述
                            </div>
                            <div class="am-u-sm-12 am-u-md-10">
                                <textarea rows="10" placeholder="请使用富文本编辑插件" name="content">{$article.content}</textarea>
                            </div>
                        </div>
                    </div>

                    <div class="am-tab-panel am-fade am-form" id="tab3">
                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                SEO 标题
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <input type="text" class="am-input-sm" name="seo_title" value="{$seo.title}">
                            </div>
                        </div>

                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                SEO 关键字
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <input type="text" class="am-input-sm" name="seo_keywords" value="{$seo.keywords}">
                            </div>
                        </div>

                        <div class="am-g am-margin-top-sm">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                SEO 描述
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end">
                                <textarea rows="4" name="seo_description">{$seo.description}</textarea>
                            </div>
                        </div>

                    </div>
                    <input type="hidden" name="id" value="{$article.id}"/>
                </div>

            </div>

            <div class="am-margin">
                <button type="button" class="am-btn am-btn-primary am-btn-xs" id="submit">提交保存</button>
                <button type="button" class="am-btn am-btn-primary am-btn-xs" id="cancel">放弃保存</button>
            </div>
        </form>
    </div>
    <!-- content end -->

</div>
<include file="common/footer"/>
<script type="text/javascript" src="__PUBLIC__/admin/article/edit.js"></script>
</body>
</html>
